package com.zoke.support.base;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

/**
 * fragmentPager
 * 
 * @author jack
 * 
 */
public abstract class BaseFragmentPagerAdapter extends FragmentPagerAdapter {

	public BaseFragmentPagerAdapter(FragmentManager fm) {
		super(fm);
	}

	@Override
	public Fragment getItem(int position) {
		return getFragment(position);
	}

	@Override
	public int getCount() {
		return getTabsCounts();
	}

	/** 返回tabs的数量 **/
	protected abstract int getTabsCounts();

	/** 返回对应位置的Fragment **/
	protected abstract Fragment getFragment(int position);

}
